package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AppBannersMapper;
import com.ruoyi.system.domain.AppBanners;
import com.ruoyi.system.service.IAppBannersService;

/**
 * 引导页Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-03-30
 */
@Service
public class AppBannersServiceImpl implements IAppBannersService 
{
    @Autowired
    private AppBannersMapper appBannersMapper;

    /**
     * 查询引导页
     * 
     * @param id 引导页主键
     * @return 引导页
     */
    @Override
    public AppBanners selectAppBannersById(Long id)
    {
        return appBannersMapper.selectAppBannersById(id);
    }

    /**
     * 查询引导页列表
     * 
     * @param appBanners 引导页
     * @return 引导页
     */
    @Override
    public List<AppBanners> selectAppBannersList(AppBanners appBanners)
    {
        return appBannersMapper.selectAppBannersList(appBanners);
    }

    /**
     * 新增引导页
     * 
     * @param appBanners 引导页
     * @return 结果
     */
    @Override
    public int insertAppBanners(AppBanners appBanners)
    {
        appBanners.setCreateTime(DateUtils.getNowDate());
        return appBannersMapper.insertAppBanners(appBanners);
    }

    /**
     * 修改引导页
     * 
     * @param appBanners 引导页
     * @return 结果
     */
    @Override
    public int updateAppBanners(AppBanners appBanners)
    {
        return appBannersMapper.updateAppBanners(appBanners);
    }

    /**
     * 批量删除引导页
     * 
     * @param ids 需要删除的引导页主键
     * @return 结果
     */
    @Override
    public int deleteAppBannersByIds(Long[] ids)
    {
        return appBannersMapper.deleteAppBannersByIds(ids);
    }

    /**
     * 删除引导页信息
     * 
     * @param id 引导页主键
     * @return 结果
     */
    @Override
    public int deleteAppBannersById(Long id)
    {
        return appBannersMapper.deleteAppBannersById(id);
    }
}
